/**
 * 
 */
package com.techq.weibo.robot;

import java.util.List;

import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpUriRequest;

import com.techq.weibo.meta.User;
import com.techq.weibo.share.enums.DestShare;
import com.techq.weibo.share.enums.Target;
import com.techq.weibo.share.exception.ShareException;

/**
 * @author tassemble@gmail.com 
 * 2011-8-2
 */
public interface CrawlRobot {

	
	public boolean auth(String url, User user) throws ShareException;
	
	/**
	 * httpClient must be initialized
	 * @param httpClient
	 * @param url
	 * @param params
	 * @return String
	 * @throws ShareException 
	 */
	public String post(String url, List<NameValuePair> params) throws ShareException;

	
	
	/**
	 * httpClient must be initialized
	 * @param url
	 * @param httpClient
	 * @return String
	 * @throws ShareException 
	 */
	public StringBuilder get(String url) throws ShareException;
	
	
	public boolean hasAuthed();
	
	
	public String lookUp(Target target, String url, DestShare dest)
	throws ShareException;
	
	
	public StringBuilder execute(HttpUriRequest request) throws ShareException;
	
	
	public void setLastPage(String page) throws ShareException;
	
	public String getLastPage() throws ShareException;
	
}
